package com.yonyou.pmclouds.processphoto.mapper;

import com.yonyou.pmclouds.basecom.cache.RedisCache;
import com.yonyou.pmclouds.basecom.dao.BaseMapper;
import com.yonyou.pmclouds.processphoto.entity.ProcessPhotoVO;
import org.apache.ibatis.annotations.*;

@CacheNamespace(implementation = RedisCache.class)
public interface ProcessPhotoMapper extends BaseMapper<ProcessPhotoVO>{

    @Select("select * from pm_processphoto where pk_project = #{pk_project} and dr = 0  order by creationtime desc")
    @ResultMap("getMap")
    ProcessPhotoVO[] selectByPkProject(String pk_project);

    Integer selectRefByCode(@Param("code")String code,@Param("ids") String[] ids);

    ProcessPhotoVO[] queryByCondition(@Param("pkProjects")String[] pkProjects,
                                           @Param("creators") String[] creators,
                                           @Param("startDate") String startDate,
                                           @Param("endDate") String endDate,
                                           @Param("billStatus") int[] billStatus,
                                           @Param("start") int start,
                                           @Param("size") int size);
    int countByCondition(@Param("pkProjects")String[] pkProjects,
                         @Param("creators") String[] creators,
                         @Param("startDate") String startDate,
                         @Param("endDate") String endDate,
                         @Param("billStatus") int[] billStatus);

}
